Integrand size = 21, antiderivative size = 53 \[ \int \cot (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {b (2 a+b) \log (\cos (e+f x))}{f}+\frac {(a+b)^2 \log (\sin (e+f x))}{f}+\frac {b^2 \sec ^2(e+f x)}{2 f} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4223, 457, 90} \[ \int \cot (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {(a+b)^2 \log (\sin (e+f x))}{f}-\frac {b (2 a+b) \log (\cos (e+f x))}{f}+\frac {b^2 \sec ^2(e+f x)}{2 f} \]
[In]
[Out]
Rule 90
Rule 457
Rule 4223
Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {\left (b+a x^2\right )^2}{x^3 \left (1-x^2\right )} \, dx,x,\cos (e+f x)\right )}{f} \\ & = -\frac {\text {Subst}\left (\int \frac {(b+a x)^2}{(1-x) x^2} \, dx,x,\cos ^2(e+f x)\right )}{2 f} \\ & = -\frac {\text {Subst}\left (\int \left (-\frac {(a+b)^2}{-1+x}+\frac {b^2}{x^2}+\frac {b (2 a+b)}{x}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f} \\ & = -\frac {b (2 a+b) \log (\cos (e+f x))}{f}+\frac {(a+b)^2 \log (\sin (e+f x))}{f}+\frac {b^2 \sec ^2(e+f x)}{2 f} \\ \end{align*}
Time = 0.25 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.58 \[ \int \cot (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {2 \left (b^2+2 \cos ^2(e+f x) \left (-b (2 a+b) \log (\cos (e+f x))+(a+b)^2 \log (\sin (e+f x))\right )\right ) (a \cos (e+f x)+b \sec (e+f x))^2}{f (a+2 b+a \cos (2 (e+f x)))^2} \]
[In]
[Out]
Time = 1.85 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.94
method | result | size |
derivativedivides | \(\frac {a^{2} \ln \left (\sin \left (f x +e \right )\right )+2 a b \ln \left (\tan \left (f x +e \right )\right )+b^{2} \left (\frac {1}{2 \cos \left (f x +e \right )^{2}}+\ln \left (\tan \left (f x +e \right )\right )\right )}{f}\) | \(50\) |
default | \(\frac {a^{2} \ln \left (\sin \left (f x +e \right )\right )+2 a b \ln \left (\tan \left (f x +e \right )\right )+b^{2} \left (\frac {1}{2 \cos \left (f x +e \right )^{2}}+\ln \left (\tan \left (f x +e \right )\right )\right )}{f}\) | \(50\) |
risch | \(-i a^{2} x -\frac {2 i a^{2} e}{f}+\frac {2 b^{2} {\mathrm e}^{2 i \left (f x +e \right )}}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2}}-\frac {2 b \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) a}{f}-\frac {b^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{f}+\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) a^{2}}{f}+\frac {2 \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) a b}{f}+\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) b^{2}}{f}\) | \(145\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.49 \[ \int \cot (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {{\left (2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} \log \left (\cos \left (f x + e\right )^{2}\right ) - {\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} \log \left (-\frac {1}{4} \, \cos \left (f x + e\right )^{2} + \frac {1}{4}\right ) - b^{2}}{2 \, f \cos \left (f x + e\right )^{2}} \]
[In]
[Out]
\[ \int \cot (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\int \left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2} \cot {\left (e + f x \right )}\, dx \]
[In]
[Out]
none
Time = 0.19 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.21 \[ \int \cot (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {{\left (2 \, a b + b^{2}\right )} \log \left (\sin \left (f x + e\right )^{2} - 1\right ) - {\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left (\sin \left (f x + e\right )^{2}\right ) + \frac {b^{2}}{\sin \left (f x + e\right )^{2} - 1}}{2 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 247 vs. \(2 (51) = 102\).
Time = 0.32 (sec) , antiderivative size = 247, normalized size of antiderivative = 4.66 \[ \int \cot (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {a^{2} \log \left ({\left | -\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 2 \right |}\right ) + {\left (2 \, a b + b^{2}\right )} \log \left ({\left | -\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} - 2 \right |}\right ) - \frac {2 \, a b {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} + b^{2} {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} + 4 \, a b - 2 \, b^{2}}{\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 2}}{2 \, f} \]
[In]
[Out]
Time = 20.39 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.09 \[ \int \cot (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )\,\left (a^2+2\,a\,b+b^2\right )}{f}-\frac {a^2\,\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f}+\frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^2}{2\,f} \]
[In]
[Out]